https://leetcode.cn/problems/minimum-genetic-mutation/description/
class Solution {
public:

    int minMutation(string startGene, string endGene, vector<string>& bank) {
        string oper="ACGT";
        unordered_set<string> hash(bank.begin(),bank.end());
        unordered_set<string> visit;

        if(startGene==endGene) return 0;
        if(!hash.count(endGene)) return -1;

        queue<string> q;
        q.push(startGene);
        visit.insert(startGene);
        int ret=0;
        while(!q.empty())
        {
            ret++;
            //计算相邻的点
            int sz=q.size();
            while(sz--)
            {
                string tmp=q.front();
                q.pop();
                for(int i=0;i<8;i++)
                {
                    string t=tmp;
                    cout<<t<<endl;
                    for(int j=0;j<4;j++)
                    {
                        t[i]=oper[j];
                        if(hash.count(t)&&!visit.count(t))
                        {
                            if(t==endGene)
                                return ret;
                            q.push(t);
                            visit.insert(t);
                            cout<<t<<endl;
                        }
                    }
                }
            }
        }
        return -1;
    }
};